// pages/sendCard/sendCard.js
Page({
  data: {
    avatarUrl: "",
    nickName: "",
  },
  onLoad: function (options) {
    let _this = this
    tt.getUserInfo({
      withCredentials: true,
      success(res) {
        _this.setData({
          nickName: res.userInfo.nickName,
          avatarUrl: res.userInfo.avatarUrl
        })
      },
      fail(res) {
        console.log("getUserInfo 调用失败");
      },
    });
    tt.showShareMenu({
      success(res) {
        console.log("已成功显示转发按钮");
      },
      fail(err) {
        console.log("showShareMenu 调用失败", err.errMsg);
      },
      complete(res) {
        console.log("showShareMenu 调用完成");
      },
    });
  },
  close: function () {
    tt.navigateBack({
      delta: 1
    });
  },
  qq: function () {
    tt.navigateTo({
      url: '../../pages/previewCard/previewCard' // 指定页面的url
    });
  },
})